<!DOCTYPE html>
<html>
<head>
{include file="common/head"}
</head>

<body style="background-color: #f2f2f2;">
{include file="common/header"}
<div class="layui-container" style="margin-top: 80px;">

  <div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-body">
          <div class="layui-row" style="padding: 15px 0 15px 0;">
            <div class="layui-col-md2 portrait-lg" style="text-align: center;">
              {:portrait($loginUser.uid)}
            </div>
            <div class="layui-col-md10" style="height: 100px;position: relative;margin-top: 20px;">
              <h1>{$loginUser.username}</h1>
              <p><span style="color: #888;">{$loginUser.usersign}</span> <a href="#signEdit" class="J_dialog" style="color: #01AAED;" data-json='{"sign":"{$loginUser.usersign}"}' title="编辑签名"><i class="layui-icon">&#xe642;</i> 编辑</a></p>
              <div style="position: absolute;bottom: 0px;text-align: center;color: #2F4056;"><span style="margin-right: 5px;"><i class="layui-icon">&#x1005;</i> 采纳数 {$loginUser.data.adopt}</span> | <span style="margin-right: 5px;margin-left: 5px;"><i class="layui-icon">&#xe607;</i> 提问数 {$loginUser.data.ask}</span> | <span style="margin-right: 5px;margin-left: 5px;"><i class="layui-icon">&#xe6b2;</i> 回复数 {$loginUser.data.answer}</span> | <span style="margin-right: 5px;margin-left: 5px;"><i class="layui-icon">&#xe621;</i> 文章数 {$loginUser.data.article}</span> | <span style="margin-right: 5px;margin-left: 5px;"><i class="layui-icon">&#xe6c6;</i> 获赞数 {$loginUser.data.praise}</span> | <span style="margin-right: 5px;margin-left: 5px;"><i class="layui-icon">&#xe600;</i> 收藏数 {$loginUser.data.collect}</span> | <span style="margin-right: 5px;margin-left: 5px;"><i class="layui-icon">&#xe770;</i> 我的粉丝 {$loginUser.data.fans}</span> | <span style="margin-right: 5px;margin-left: 5px;"><i class="layui-icon">&#xe643;</i> 我的关注 {$loginUser.data.follow}</span></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="layui-row layui-col-space15">
    <div class="layui-col-md3">
      {include file="user/menu"}
    </div>
    
    <div class="layui-col-md9">
      <div class="layui-card">
        <div class="layui-card-body">
        {if $action eq 'index'}{include file="user/index"}{/if}
        {if $action eq 'ask'}{include file="user/ask"}{/if}
        {if $action eq 'answer'}{include file="user/answer"}{/if}
        {if $action eq 'article'}{include file="user/article"}{/if}
        {if $action eq 'fans'}{include file="user/fans"}{/if}
        {if $action eq 'collect'}{include file="user/collect"}{/if}
        {if $action eq 'notice'}{include file="user/notice"}{/if}
        </div>
      </div>
    </div>
  </div>


</div>
{include file="common/footer"}
<!--分享-->
<script id="signEdit" type="text/html">
<div class="layui-row" style="width: 300px;">
<div class="layui-card"> <div class="layui-card-body"> <form class="layui-form" lay-filter="popup-form" action="{:url('wendasns/common/usersign')}" method="post"> <input type="hidden" name="id" value="14"> <div class="layui-form-item"><input type="text" name="sign" lay-verify="required" class="layui-input" value="{{d.sign}}"/></div> <div class="layui-form-item"> <div class="layui-inline" style="text-align: right;float: right;"> <div class="layui-input-inline" style="width: auto;"> <button class="layui-btn" lay-submit="" lay-filter="J_ajax_submit_btn">提交</button> </div> </div> </div> </form> </div> </div>
</div>
</script>
<script type="text/javascript">
;!function(){
    var $ = layui.$
    ,element = layui.element;
    
  element.render('collapse');
    //我的消息，监听折叠
  element.on('collapse(component-panel)', function(data){
  	var _this=$(this),state = _this.attr('data-state'),id = _this.data('id');
    if(data.show && state==0){
    	$.post('{:url('wendasns/common/notice')}',{id:id},function(){
    		_this.attr('data-state',1);
    		_this.find('span').eq(1).text('已读');
    	},'json');
    }
  });
  
}();
</script>
</body>
</html>